<script>
	import { mapMutations } from 'vuex'
	
	export default {
		methods: {
			...mapMutations('user', ['setUserId', 'setUsername'])
		},
		onLaunch: function() {
			const user = uni.getStorageSync('user')
		
			if (user) {
				this.setUserId(user.userId)
				this.setUsername(user.username)
			}
		},
		onShow: function() {
			
		},
		onHide: function() {
			
		}
	}
</script>

<style lang="scss">
	@import "uview-ui/index.scss";
	
	page{
		background-color: #edeff0;
	}
</style>
